$(document).ready(
  function() {
    data = [];
    count = 0;
    $('.uploadFile').on('change', function(event) {
      var oReader = new FileReader();
      oReader.readAsDataURL(event.target.files[0]);
      oReader.onload = function(e) {
        var sBase64 = e.target.result;
        data.push(sBase64);
        if ((event.target.files[0].type).match("image") !== null) {
          $('.preView')[count].src = sBase64;
          count++;
          $('body').append('<img src="" class="preView">');
        }
      }
    })
  }
)